Skip to content

frontend: Add float support - #1049

Open
BadGraphixD wants to merge 1 commit into
masterfrom
feature/float-frontend-support
Open

frontend: Add float support#1049
BadGraphixD wants to merge 1 commit into
masterfrom
feature/float-frontend-support

Conversation

@BadGraphixD

@BadGraphixD BadGraphixD commented Aug 3, 2026

Copy link
Copy Markdown
Contributor
  • Adds float-type definition
  • Adds annotation [ IEEE : <size> ] for float-type
  • Adds annotation [ [sticky] fe flag <flag-name> : <format-field> ] for registers
  • Adds new syntax for SymbolExpr: id::path::<const params>(params)
  • Adds new VIAM nodes and built-in types
    • FloatFormat node
    • Constant.FloatType
    • VIAM annotation for float exception flags
    • The built-in type FloatType, which is the type of FloatFormat
  • Adds constant-param-based type inference and checking for built-ins

@BadGraphixD
BadGraphixD requested a review from Jozott00 August 3, 2026 17:09
@github-actions github-actions Bot added the enhancement New feature or request label Aug 3, 2026
@BadGraphixD
BadGraphixD enabled auto-merge August 3, 2026 17:09
@BadGraphixD BadGraphixD added frontend This is frontend related language Language changes labels Aug 3, 2026
@BadGraphixD
BadGraphixD force-pushed the feature/float-frontend-support branch from bbdff3a to e5bd690 Compare August 4, 2026 21:25

@Jozott00 Jozott00 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VIAM side looks good! (just the copy/paste error)

I would like to leave the frontend review to @flofriday

public void verify() {
super.verify();
// FIXME: for now this is checked here, but this should create a diagnostic instead of ViamError
ensure(encoding != null, "Encoding not specified");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is checked by the annotation right? So it should be fine to have it as a safe guard ViamError here.

@BadGraphixD BadGraphixD Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If no annotation is present, then the encoding is missing, which should lead to a diagnostic error. I am not sure how the absence of an annotation should be checked.

Comment thread vadl/main/vadl/viam/annotations/FloatFlagAnnotation.java
@Jozott00
Jozott00 requested a review from flofriday August 5, 2026 20:04
@flofriday

Copy link
Copy Markdown
Contributor

I'm still on vacation till Saturday (in the woods without any laptop) so this review will take until the end of the week.

Thanks for including me @Jozott00 😊

- Adds float-type definition
- Adds annotation [ IEEE : <size> ] for float-type
- Adds annotation [ [sticky] fe flag <flag-name> : <format-field> ]
  for registers
- Adds new syntax for SymbolExpr: id::path::<const params>(params)
- Adds new VIAM nodes and built-in types
  - FloatFormat node
  - Constant.FloatType
  - VIAM annotation for float exception flags
  - The built-in type FloatType, which is the type of FloatFormat
- Adds constant-param-based type inference and checking for
  built-ins
@BadGraphixD
BadGraphixD force-pushed the feature/float-frontend-support branch from e5bd690 to c39a8b1 Compare August 5, 2026 21:40
@BadGraphixD

Copy link
Copy Markdown
Contributor Author

@flofriday please take a look at #578 (comment) before the review, as it explains the intention behind this PR and the open problem with the new syntax. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request frontend This is frontend related language Language changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants